const { http } = uni.$u

// 机器人接口
export const robot = (params) => http.get('http://api.qingyunke.com/api.php', params)
// 登录
export const login = (data) => http.post('/user/login', data)
// 退出
export const logout = () => http.delete('/userVerify/logout')
// 修改密码
export const updatePassword = (data) => http.put('/user/updatePassword'+data)
// 注册
export const register = (data) => http.post('/userVerify/register', data)
// 修改用户信息
export const updateUser = (data) => http.put('/user/updateUser', data)
// 获取聊天记录
export const getMsgAllByUserId = (params) => http.get('/messages/queryAllById', params)
// 新增聊天记录
export const addMsg = (data) => http.post('/messages/add', data)
// 获取好友列表
export const getFriends = (params) => http.get('/friends/queryAllByUserId', params)
// 获取群组列表
export const getGroups = (params) => http.get('/groups/queryByUserId', params)

export const getGroupMsgAllByid = (params) => http.get('/messages/queryAllByGroupId', params)

export const getNotifications = (params) => http.get('/messages/queryNotifications', params)

export const setReadedNews = (params) => http.get('/messages/setReadedNews', params)